<include file="public:top" />
<!--网站设置-->
<body class="body">
<fieldset class="layui-elem-field layui-field-title" style="margin-top:0px;">
    <legend>{$menuid|getmenuname}</legend>
</fieldset>
 <blockquote class="layui-elem-quote">转换设置说明：<br/> 
七只熊云转换：七只熊在线云转换服务，获取appid、appsecret，请联系七只熊客服：<a target="_blank" href="http://wpa.qq.com/msgrd?v=3&amp;uin=&amp;site=qq&amp;menu=yes" style="color: #1E9FFF">996403</a> 交流群：<a target="_blank" href="//shang.qq.com/wpa/qunwpa?idkey=4ca374dc4da225a81f2af37c6bc607487bc907ae2ae6306159f10867fa10510d" style="color: #1E9FFF"> 633871890 </a>
<br>
百度DOC转换：自行申请百度DOC转换服务，申请网址：
<a href="https://cloud.baidu.com/product/doc.html" target="_blank">https://cloud.baidu.com/product/doc.html</a>
</blockquote>
<form class="layui-form layui-form-pane" action="">
    <input type="hidden" name="menuid"  value="{$menuid}"/>
    <div class="layui-form-item" pane="">
        <label class="layui-form-label">转换工具</label>
        <div class="layui-input-block">
       <input type="radio" title="七只熊云转换" <if condition="C('wkcms_convert_type') neq '2'">checked="checked"</if> value="1" name="setting[convert_type]">
       <input type="radio" title="百度DOC转换" <if condition="C('wkcms_convert_type') eq '2'">checked="checked"</if> value="2" name="setting[convert_type]">
        </div>
    </div>
 

	<div class="layui-form-item convert_type type_1" <if condition="C('wkcms_convert_type') neq '1'">style="display:none;"</if>>
        <label class="layui-form-label">云转换地址</label>
        <div class="layui-input-block">
            <input type="text" name="setting[convert_site_1]" placeholder="请输入云转换地址" class="layui-input" value="{:C('wkcms_convert_site_1')}" disabled="">
        </div>
    </div>

    <div class="layui-form-item convert_type type_1" <if condition="C('wkcms_convert_type') neq '1'">style="display:none;"</if>>
        <label class="layui-form-label">appid</label>
        <div class="layui-input-block">
            <input type="text" name="setting[convert_appid_1]" placeholder="请输入Appid" class="layui-input" value="{:C('wkcms_convert_appid_1')}">
        </div>
    </div>

    <div class="layui-form-item convert_type type_1" <if condition="C('wkcms_convert_type') neq '1'">style="display:none;"</if>>
        <label class="layui-form-label">appsecret</label>
        <div class="layui-input-block">
             <textarea placeholder="请输入Appsecret" name="setting[convert_appsecret_1]" class="layui-textarea">{:C('wkcms_convert_appsecret_1')}</textarea>
        </div>
        
    </div>

    <!-- 百度DOC使用说明 -->
    <div class="layui-form-item convert_type type_2" <if condition="C('wkcms_convert_type') neq '2'">style="display:none;"</if>>
        <div class="layui-input-block">
            <blockquote class="layui-elem-quote layui-quote-nm">百度DOC转换说明：<br/> 
        七只熊也可以使用百度的文档转换服务，使用百度DOC和使用七只熊效果一样。但他们价格较贵。详情参见：<a href="https://cloud.baidu.com/product/doc.html" target="_blank">https://cloud.baidu.com/product/doc.html</a><br/> 
        开启百度DOC转换服务，请联系七只熊客服：<a target="_blank" href="http://wpa.qq.com/msgrd?v=3&amp;uin=&amp;site=qq&amp;menu=yes" style="color: #1E9FFF">996403</a> 交流群：<a target="_blank" href="//shang.qq.com/wpa/qunwpa?idkey=4ca374dc4da225a81f2af37c6bc607487bc907ae2ae6306159f10867fa10510d" style="color: #1E9FFF"> 633871890 </a>
        <br>
        百度DOC转换：自行申请百度DOC转换服务，申请网址：
        <a href="https://cloud.baidu.com/product/doc.html" target="_blank">https://cloud.baidu.com/product/doc.html</a>
        </blockquote>
        </div>
    </div>
    
    <!-- 隐藏百度转换设置 -->
    <!-- <div class="layui-form-item convert_type type_2" <if condition="C('wkcms_convert_type') neq '2'">style="display:none;"</if>>
        <label class="layui-form-label">appid</label>
        <div class="layui-input-block">
            <input type="text" name="setting[convert_appid_2]" placeholder="请输入Appid" class="layui-input" value="{:C('wkcms_convert_appid_2')}">
        </div>
    </div>

    <div class="layui-form-item convert_type type_2" <if condition="C('wkcms_convert_type') neq '2'">style="display:none;"</if>>
        <label class="layui-form-label">appsecret</label>
        <div class="layui-input-block">
            <textarea placeholder="请输入Appsecret" name="setting[convert_appsecret_2]" class="layui-textarea">{:C('wkcms_convert_appsecret_2')}</textarea>
        </div>
     --></div>

    <div class="layui-form-item">
        <label class=""></label>
        <div class="layui-input-block">
        <button class="layui-btn" lay-submit="" lay-filter="upbtn">提交保存</button>
        </div>
    </div>
</form>

<script type="text/javascript" src="__PUBLIC__/admin/layui/layui.js"></script>
<script>

//Demo
layui.use(['layer','jquery','form'], function () {
   // 操作对象
    var layer = layui.layer,$ = layui.jquery,form = layui.form;
  
    form.on('radio', function (data) {
        $(".convert_type").hide();
        $(".type_" + data.value).show();
    });
  // 提交
    form.on('submit(upbtn)', function (data) {
        // 提交到方法 默认为本身
        $.post("{:u('global/edit')}",data.field,function(res){
            if(res.status.status ==  1){
                layer.msg(res.status.info,{time:1800},function(){
                  location.href = "{:u('global/index')}&type=convert&menuid={$menuid}";
                });
            }else{
                layer.msg(res.status.info,{time:1800});
                // $('.verify_img').click();
            }
        });
        return false;
    });
});
</script>
</body>
</html>